import request from '@/utils/request'

const save = function(data) {
  return request({
    url: '/SysMessage/save',
    data: data,
    method: 'post'
  })
}

const update = function(data) {
  return request({
    url: '/SysMessage/update',
    data: data,
    method: 'post'
  })
}

export function deleted(ids) {
  return request({
    url: '/SysMessage/delete',
    method: 'post',
    data: {
      ids: ids
    }
  })
}

const listPage = function(pageNum, pageSize, params) {
  return request({
    url: '/SysMessage/listPage?pageNum=' + pageNum + '&pageSize=' + pageSize,
    method: 'post',
    data: params != null ? params : {}
  })
}

export const messageApi = {
  save: save,
  update: update,
  deleted: deleted,
  listPage: listPage
}
